<?php
//include(__APP_PATH . '/model/gallery.class.php');
//include(__APP_PATH . '/model/comment.class.php');
//include(__APP_PATH . '/model/image.class.php');

$horizontal = 0;
$vertical = 0;
?>
<div id="gallery">
	<div class="galleryRow">
	<?php
	foreach($oGallery->getImages() as $image) {
		if($horizontal == 3) {
			$horizontal = 0;
			$vertical++;
			echo '</div><div class="galleryRow">';
		}
		
		echo '<a href="' . $registry->__get("url_path") . 'image/view/' . $image->getItemID() . '"><img src="' . $registry->__get("url_path") . 'photos/thumb/' . $image->getFilename() . '" /></a>';
		
		$horizontal++;
		//if($horizontal == 10 && $vertical == 4) break;
	}
	?>
	</div>
</div>